<?php $this->_extends('../_layouts/blank_layout'); ?>
<?php $this->_block('contents'); ?>
<script type="text/javascript" src="<?=Q::ini('custom_system/base_url')?>js/validator.js"></script>
<h3>基板块ID: <?=$base_part['id']?></h3>
<form method="post" action="<?=url('Online::EbayTemplate/BasePartEditSave')?>" onsubmit="return Validator.Validate(this,3);">
<table class="form_table" width="90%">
<tr>
	<th>基板块名称</th>
	<td><input type="text" name="name" value="<?=$base_part['name']?>" dataType="Require" msg=" 名称不能为空" /></td>
</tr>
<tr>
	<th>基板块变量</th>
	<td><input type="text" name="variable_name" value="<?=$base_part['variable_name']?>" dataType="Require" msg=" 变量不能为空" /></td>
</tr>
<tr>
	<th>所在基板</th>
	<td>
		<select name="base_id" dataType="Require" msg=" 请选择所属基板">
			<?foreach ($base as $b):?>
			<option value="<?=$b['id']?>" <?if ($b['id'] == $base_part['ebay_template_base_id']) echo "selected='selected'"?>><?=$b['name']?></option>
			<?endforeach;?>
		</select>
	</td>
</tr>
<tr>
	<th>基板块内容</th>
	<td><textarea name="content" cols="80" rows="18"><?=$base_part['content']?></textarea></td>
</tr>
<tr>
	<th><input type="hidden" name="id" value="<?=$base_part['id']?>" /></th>
	<td><input type="submit" class="button" value="提交" /></td>
</tr>
</table>
<a href="<?=url('Online::EbayTemplate/BaseDetail', array('id' => $base_part['ebay_template_base_id']))?>">返回上一级</a>
</form>
<?php $this->_endblock();?>